Skip to content

Performance improvements#10

Merged
CalebRose merged 1 commit into
CalebRose:masterfrom
jedibob5:performance
Jun 29, 2025
Merged

Performance improvements#10
CalebRose merged 1 commit into
CalebRose:masterfrom
jedibob5:performance

Conversation

@jedibob5

@jedibob5 jedibob5 commented Jun 28, 2025

Copy link
Copy Markdown
Collaborator

Attempts to make several performance improvements on the API. From testing, the Facedata retrieval was the longest part of the Bootstrap 1 call, and shouldn't be necessary to displaying the initial homepage. This has been moved to Bootstrap 3 to let that finish in the background. Additionally, for the football bootstrap data, EasyJSON a new, more performant JSON encoder, was employed to allow the API to marshal the JSON responses to the bootstap calls more quickly.

Based on local testing, the response time for Bootstrap 1 has been improved by about 2 seconds, and although Bootstrap 3 takes about a second longer now, it happens in the background after the page loads, so it should be less noticeable to the user. Response times in Azure seems to be significantly different compared to local, so the final impact there probably won't be known until merge, but it should be faster.

NOTE: This will require a small change on the V2 interface to work correctly. The PR for this change is here. If either change is deployed without the other, attempting to open a player card will crash the page!

Local testing results:
Main branch, without changes:
image
Bootstrap one response time: 5148ms
Bootstrap three response time: 4210ms

Performance branch, with changes:
image
Bootstrap one response time: 3117ms
Bootstrap three response time: 5351ms

orderedStats := CollegeStats
resultList := []structs.CollegePlayer{}
if statType == "PASSING" {
switch statType {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VSCode offered to auto-convert these to switch statements, and I figured why not.

@CalebRose

Copy link
Copy Markdown
Owner

Approved. For some reason the CI/CD pipeline check is failing but it might work once this merges into the main branch

@CalebRose
CalebRose merged commit 75d473c into CalebRose:master Jun 29, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants